{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "029edaf2",
   "metadata": {},
   "source": [
    "*    1.必须做：课本第十页的标准库\n",
    "    \n",
    "    2.尝试找到3个模块进行调用（例如：time,datetime均可）\n",
    "    \n",
    "    3.尝试在以上模块找到1-3个方法进行练习"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "bf31be37",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'win32'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import sys\n",
    "sys.platform"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a0ba88e4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]\n"
     ]
    }
   ],
   "source": [
    "print(sys.version)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "282c3e3c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<function nt.abort()>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "os.abort"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c5a582df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<function nt.access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "os.access"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "48724ebd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "os.altsep"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ded070a8",
   "metadata": {},
   "source": [
    "* 3个模块"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "59af0680",
   "metadata": {},
   "source": [
    "# 一"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "70c0f32f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 10, 24)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import datetime\n",
    "datetime.date.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9b4125f0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today().day"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1ac9f1a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today().month"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "579fa122",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2022"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today().year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "38e3d47c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2022-10-24'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.isoformat(datetime.date.today())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "83117147",
   "metadata": {},
   "source": [
    "# 二"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "de155bb1",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "c8a597e8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'13:49'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.strftime(\"%H:%M\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "9e5bf080",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'MondayPM'"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.strftime(\"%A%p\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "37bf4914",
   "metadata": {},
   "source": [
    "# 三"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "eabffde4",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "27241996",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<function nt.cpu_count()>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.cpu_count"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
